package otherClasses;

import javax.servlet.http.HttpSession;

import ejb.IRemoteLoginnedUserBean;

public class CheckAuth {
	
	public static boolean CheckAuth(final HttpSession session){
		if(session.getAttribute("userBean")!=null){
			IRemoteLoginnedUserBean bean=(IRemoteLoginnedUserBean) session.getAttribute("userBean");
			if (bean.checkAuthorisation( System.currentTimeMillis()))
				return true;
			else
				return false;
		}
		else
			return false;
	}
}
